home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group00b.txt / 000048_icon-group-sender _Mon Sep 4 13:44:10 2000.msg < prev    next >
Internet Message Format  |  2001-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id NAA02942
  4.     for icon-group-addresses; Mon, 4 Sep 2000 13:43:57 -0700 (MST)
  5. Message-Id: <200009042043.NAA02942@baskerville.CS.Arizona.EDU>
  6. From: Guido Milanese <gmilanese@mclink.it>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Graphics: TextList problem
  9. Date: Sat, 02 Sep 2000 21:44:25 +0200
  10. X-Accept-Language: it, en
  11. To: icon-group@optima.CS.Arizona.EDU
  12. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  13. Status: RO
  14. Content-Length: 1507
  15.  
  16. I noticed that the participants to this discussion group are all
  17. almost all at "high level"... and therefore I always hesitate
  18. before asking simple questions. However, I take the libery to
  19. post a simple question on graphics. I would like to use the
  20. TextList instruction to display the contents of a file or of long
  21. variables. I used VIB and I obtain this code, slightly edited:
  22.  
  23. #===<<vib:begin>>===    modify using vib; do not remove this marker
  24. line
  25. procedure ui_atts()
  26.    return ["size=600,401", "bg=pale gray"]
  27. end
  28.  
  29. procedure ui(win, cbk)
  30. return vsetup(win, cbk,
  31.    [":Sizer:::0,0,600,400:",],
  32.    ["list:List:r::116,89,400,50:",list_cb],
  33.    )
  34. end
  35. #===<<vib:end>>===    end of section maintained by vib
  36.  
  37.  
  38. The callback procedure (but is it necessary?) is
  39.  
  40. procedure list_cb(vidget, value)
  41.    return
  42. end
  43.  
  44. and I setup windows this way:
  45.  
  46.   VSetItems(vidgets["list"], ["a", "b", "c", "d"])
  47.  
  48. But if I substitute this test list with real data, I see that
  49. output terminates at each newline char: I read a file in
  50. untranslated mode, save input as a variable (e.g. testvar), and
  51. write as such:
  52.  
  53.   VSetItems(vidgets["list"], [testvar])
  54.  
  55. but output stops after the first newline (I tested the output in
  56. a "normal" window and it's all OK).
  57.  
  58. How can I do?
  59.  
  60. Thanks!
  61.  
  62. Guido (Italy)
  63.  
  64. ------------------------------------------------------
  65. Guido Milanese            Vocal Ensemble "Ars Antiqua"
  66. gmilanese@mclink.it       http://fly.to/arsantiqua
  67. Salita del Passero 11     I-16126 Genova GE, Italy
  68. * Sed nomini tuo da gloriam *
  69.